<script setup>
import { RouterView } from 'vue-router'
</script>

<template>
  <div>
    <nav class="nav-links">
      <router-link to="/" class="nav-link">首页</router-link>
      <router-link to="/md" class="nav-link">编辑器</router-link>
	  <router-link to="/tMd" class="nav-link">新编辑器</router-link>
    </nav>
    <router-view></router-view>
  </div>
</template>

<style scoped>
.nav-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.nav-link {
  text-decoration: none;
  color: #2c3e50;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-link:hover {
  background-color: #e0e0e0;
}

.nav-link.router-link-active {
  background-color: #42b883;
  color: white;
}

</style>
